import request from '@/utils/request'
import { httphost } from '@/utils/global'

export function fetchList(query) {
  return request({
    url: '',
    method: 'get',
    params: query,
    baseURL: httphost + '/api/v1/cases/list'
  })
}

export function fetchCase(id) {
  return request({
    url: '',
    method: 'get',
    params: { id },
    baseURL: httphost + '/api/v1/cases/case'
  })
}

export function createCase(data) {
  return request({
    url: '',
    method: 'post',
    data,
    baseURL: httphost + '/api/v1/cases/case'
  })
}

export function updateCase(data) {
  return request({
    url: '',
    method: 'put',
    data,
    baseURL: httphost + '/api/v1/cases/case'
  })
}

export function addEvidence(data) {
  return request({
    url: '',
    method: 'post',
    data,
    baseURL: httphost + '/api/v1/cases/case/create'
  })
}
export function fetchEvidenceList(query) {
  return request({
    url: '',
    method: 'get',
    params: query,
    baseURL: httphost + '/api/v1/evidences/list'
  })
}
